/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui;

import delta.Calculations;
import model.Laminaat;
import model.MaterialDirection;
import Jama.Matrix;
import model.Lamel;
import model.Layer;

import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Memet
 */
public class showLaminateDetails extends javax.swing.JFrame {

    //Materiaal mat;
    Lamel mat;
    Laminaat lam;
    /**
     * Creates new form showLaminateDetails
     */
    public showLaminateDetails() {
        initComponents();
        mat = null;
        lam = null;
    }

    public void setLaminaat(Laminaat laminaat)
    {
        this.lam = laminaat;
        this.updateForm();
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel7 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblLayers = new javax.swing.JTable();
        pnlMat1 = new javax.swing.JPanel();
        pnlMat = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        lblMatH = new javax.swing.JLabel();
        lblMatRho = new javax.swing.JLabel();
        pnlExample = new draw.pnlExample();
        btnMore = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        lblEl = new javax.swing.JLabel();
        lblGlt = new javax.swing.JLabel();
        lblEt = new javax.swing.JLabel();
        lblGltVal = new javax.swing.JLabel();
        lblElVal = new javax.swing.JLabel();
        lblNultVal = new javax.swing.JLabel();
        lblNult = new javax.swing.JLabel();
        lblEtVal = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        lblMatName = new javax.swing.JLabel();
        lblMatManufacturer = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        lblAlpha1 = new javax.swing.JLabel();
        lblAlpha2 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        lblAlpha12 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        lblAlphaC1 = new javax.swing.JLabel();
        lblAlphaC2 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        lblAlphaC12 = new javax.swing.JLabel();
        lblName = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        mvpA = new draw.MatrixViewPane();
        jLabel3 = new javax.swing.JLabel();
        mvpB = new draw.MatrixViewPane();
        jLabel4 = new javax.swing.JLabel();
        mvpD = new draw.MatrixViewPane();
        jLabel5 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        lblE1 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        lblH = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        lblRho = new javax.swing.JLabel();
        lblE2 = new javax.swing.JLabel();
        lblE3 = new javax.swing.JLabel();
        lblG23 = new javax.swing.JLabel();
        lblG12 = new javax.swing.JLabel();
        lblG31 = new javax.swing.JLabel();
        lblv12 = new javax.swing.JLabel();
        lblv23 = new javax.swing.JLabel();
        lblv31 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        tblLayers.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "#", "Material", "Angle [°]", "Thickness [mm]", "Plot"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.Object.class, java.lang.Double.class, java.lang.Double.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblLayers.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tblLayers.getTableHeader().setReorderingAllowed(false);
        tblLayers.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblLayersMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tblLayers);

        pnlMat1.setBorder(javax.swing.BorderFactory.createTitledBorder("Material"));

        jLabel1.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel1.setText("ρ:");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel2.setText("Thickness:");

        lblMatH.setText("<h> mm");

        lblMatRho.setText("<rho> Kg/m3");

        javax.swing.GroupLayout pnlExampleLayout = new javax.swing.GroupLayout(pnlExample);
        pnlExample.setLayout(pnlExampleLayout);
        pnlExampleLayout.setHorizontalGroup(
            pnlExampleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        pnlExampleLayout.setVerticalGroup(
            pnlExampleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        btnMore.setText("More...");
        btnMore.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMoreActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblMatRho, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE)
                            .addComponent(lblMatH, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(pnlExample, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnMore)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(lblMatRho))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(lblMatH))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(pnlExample, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnMore))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        lblEl.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblEl.setText("El:");

        lblGlt.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblGlt.setText("Glt:");

        lblEt.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblEt.setText("Et:");

        lblGltVal.setText("<Glt> GPa");

        lblElVal.setText("<El> GPa");

        lblNultVal.setText("<vlt> GPa");

        lblNult.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblNult.setText("v12:");

        lblEtVal.setText("<Et> GPa");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblEl, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblGlt, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                    .addComponent(lblEt, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                    .addComponent(lblNult, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(4, 4, 4)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(lblElVal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblGltVal, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)
                    .addComponent(lblEtVal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblNultVal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEl)
                    .addComponent(lblElVal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEt)
                    .addComponent(lblEtVal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblGlt)
                    .addComponent(lblGltVal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNult)
                    .addComponent(lblNultVal))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        lblMatName.setFont(new java.awt.Font("Trebuchet MS", 1, 18)); // NOI18N
        lblMatName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblMatName.setText("<Name>");

        lblMatManufacturer.setFont(new java.awt.Font("Trebuchet MS", 2, 14)); // NOI18N
        lblMatManufacturer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblMatManufacturer.setText("<Manufacturer>");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblMatName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
            .addComponent(lblMatManufacturer, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblMatName)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                .addComponent(lblMatManufacturer)
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlMatLayout = new javax.swing.GroupLayout(pnlMat);
        pnlMat.setLayout(pnlMatLayout);
        pnlMatLayout.setHorizontalGroup(
            pnlMatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlMatLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlMatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlMatLayout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlMatLayout.setVerticalGroup(
            pnlMatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlMatLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlMatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlMatLayout.createSequentialGroup()
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(11, 11, 11))
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout pnlMat1Layout = new javax.swing.GroupLayout(pnlMat1);
        pnlMat1.setLayout(pnlMat1Layout);
        pnlMat1Layout.setHorizontalGroup(
            pnlMat1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlMat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        pnlMat1Layout.setVerticalGroup(
            pnlMat1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlMat1Layout.createSequentialGroup()
                .addComponent(pnlMat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(109, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlMat1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlMat1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, 0, 337, Short.MAX_VALUE))
                .addContainerGap())
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "CTE", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "In plane", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        jLabel24.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel24.setText("<html>α<sub>1</sub</html>");

        lblAlpha1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlpha1.setText("<alpha 1>");

        lblAlpha2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlpha2.setText("<alpha 2>");

        jLabel25.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel25.setText("<html>α<sub>2</sub</html>");

        jLabel26.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel26.setText("<html>α<sub>12</sub</html>");

        lblAlpha12.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlpha12.setText("<alpha 12>");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel26, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE)
                    .addComponent(jLabel24, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE)
                    .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblAlpha12, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE)
                    .addComponent(lblAlpha1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE)
                    .addComponent(lblAlpha2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAlpha1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAlpha2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAlpha12))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Curvature", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        jLabel27.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel27.setText("<html>α<sub>c1</sub</html>");

        lblAlphaC1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlphaC1.setText("<alpha c1>");

        lblAlphaC2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlphaC2.setText("<alpha c2>");

        jLabel28.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel28.setText("<html>α<sub>c2</sub</html>");

        jLabel29.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel29.setText("<html>α<sub>c12</sub</html>");

        lblAlphaC12.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlphaC12.setText("<alpha c12>");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel27, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
                    .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
                    .addComponent(jLabel29, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE))
                .addGap(7, 7, 7)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblAlphaC12, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                    .addComponent(lblAlphaC1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                    .addComponent(lblAlphaC2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAlphaC1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAlphaC2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAlphaC12))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18))
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        lblName.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
        lblName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblName.setText("<Name>");

        javax.swing.GroupLayout mvpALayout = new javax.swing.GroupLayout(mvpA);
        mvpA.setLayout(mvpALayout);
        mvpALayout.setHorizontalGroup(
            mvpALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 141, Short.MAX_VALUE)
        );
        mvpALayout.setVerticalGroup(
            mvpALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 166, Short.MAX_VALUE)
        );

        jLabel3.setFont(new java.awt.Font("Trebuchet MS", 1, 18)); // NOI18N
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("A");

        javax.swing.GroupLayout mvpBLayout = new javax.swing.GroupLayout(mvpB);
        mvpB.setLayout(mvpBLayout);
        mvpBLayout.setHorizontalGroup(
            mvpBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 143, Short.MAX_VALUE)
        );
        mvpBLayout.setVerticalGroup(
            mvpBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 166, Short.MAX_VALUE)
        );

        jLabel4.setFont(new java.awt.Font("Trebuchet MS", 1, 18)); // NOI18N
        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText("B");

        javax.swing.GroupLayout mvpDLayout = new javax.swing.GroupLayout(mvpD);
        mvpD.setLayout(mvpDLayout);
        mvpDLayout.setHorizontalGroup(
            mvpDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 142, Short.MAX_VALUE)
        );
        mvpDLayout.setVerticalGroup(
            mvpDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 166, Short.MAX_VALUE)
        );

        jLabel5.setFont(new java.awt.Font("Trebuchet MS", 1, 18)); // NOI18N
        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel5.setText("D");

        jLabel6.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel6.setText("E1:");

        jLabel7.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel7.setText("E2:");

        jLabel8.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel8.setText("E3:");

        jLabel9.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel9.setText("G12:");

        jLabel10.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel10.setText("G23:");

        jLabel11.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel11.setText("G31:");

        jLabel12.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel12.setText("v12:");

        jLabel13.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel13.setText("v23:");

        jLabel14.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel14.setText("v31:");

        lblE1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblE1.setText("<E1> GPa");

        jLabel15.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel15.setText("Thickness:");

        lblH.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblH.setText("<H> mm");

        jLabel17.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel17.setText("ρ:");

        lblRho.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblRho.setText("<Rho> Kg/m3");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel15)
                    .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblRho, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)
                    .addComponent(lblH, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(lblH))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(lblRho))
                .addContainerGap(155, Short.MAX_VALUE))
        );

        lblE2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblE2.setText("<E2> GPa");

        lblE3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblE3.setText("<E3> GPa");

        lblG23.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblG23.setText("<G23> GPa");

        lblG12.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblG12.setText("<G12> GPa");

        lblG31.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblG31.setText("<G31> GPa");

        lblv12.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblv12.setText("<v12>");

        lblv23.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblv23.setText("<v23>");

        lblv31.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblv31.setText("<v31>");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(lblE1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(lblE2, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(lblE3, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(lblG23, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(lblG12, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblG31, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(lblv12, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblv23, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblv31, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(15, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(lblE1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(lblE2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(lblE3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(lblG12))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(lblG23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(lblG31))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(lblv12))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(lblv23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(lblv31))
                .addContainerGap(15, Short.MAX_VALUE))
            .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(mvpA, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(mvpB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(mvpD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel3)
                                .addComponent(jLabel4))
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(mvpD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(mvpB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(mvpA, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(lblName, javax.swing.GroupLayout.DEFAULT_SIZE, 854, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(lblName, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(2, 2, 2)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tblLayersMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblLayersMouseClicked
        if (tblLayers.getSelectedRow() != -1) {
            mat = (Lamel) tblLayers.getModel().getValueAt(tblLayers.getSelectedRow(), 1);
            updateForm();
        }
    }//GEN-LAST:event_tblLayersMouseClicked

    private void btnMoreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMoreActionPerformed
        if (mat != null) {
            showMaterialDetails frm = new showMaterialDetails();
            frm.setMaterial(mat);
            frm.setVisible(true);
        }
    }//GEN-LAST:event_btnMoreActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnMore;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblAlpha1;
    private javax.swing.JLabel lblAlpha12;
    private javax.swing.JLabel lblAlpha2;
    private javax.swing.JLabel lblAlphaC1;
    private javax.swing.JLabel lblAlphaC12;
    private javax.swing.JLabel lblAlphaC2;
    private javax.swing.JLabel lblE1;
    private javax.swing.JLabel lblE2;
    private javax.swing.JLabel lblE3;
    private javax.swing.JLabel lblEl;
    private javax.swing.JLabel lblElVal;
    private javax.swing.JLabel lblEt;
    private javax.swing.JLabel lblEtVal;
    private javax.swing.JLabel lblG12;
    private javax.swing.JLabel lblG23;
    private javax.swing.JLabel lblG31;
    private javax.swing.JLabel lblGlt;
    private javax.swing.JLabel lblGltVal;
    private javax.swing.JLabel lblH;
    private javax.swing.JLabel lblMatH;
    private javax.swing.JLabel lblMatManufacturer;
    private javax.swing.JLabel lblMatName;
    private javax.swing.JLabel lblMatRho;
    private javax.swing.JLabel lblName;
    private javax.swing.JLabel lblNult;
    private javax.swing.JLabel lblNultVal;
    private javax.swing.JLabel lblRho;
    private javax.swing.JLabel lblv12;
    private javax.swing.JLabel lblv23;
    private javax.swing.JLabel lblv31;
    private draw.MatrixViewPane mvpA;
    private draw.MatrixViewPane mvpB;
    private draw.MatrixViewPane mvpD;
    private draw.pnlExample pnlExample;
    private javax.swing.JPanel pnlMat;
    private javax.swing.JPanel pnlMat1;
    private javax.swing.JTable tblLayers;
    // End of variables declaration//GEN-END:variables

public void updateForm() {        
        lblName.setText(lam.getName());
        int selection = tblLayers.getSelectedRow();
        //fiber tabel updaten
        DefaultTableModel model = new DefaultTableModel(
                new Object[][]{},
                new String[]{
                    "#", "Material", "Angle [°]", "Thickness [mm]", "Plot"
                });
        tblLayers.setModel(model);
        //Matrix matrix = lam.getLam();
        //for(int i = 0; i<lam.getLam().getRowDimension(); i++)
        int i = 0;
        for (Layer layer : lam.getLayers())
        {
            //Materiaal m = Global.data.getMateriaal((int)matrix.get(i, 1));
            Lamel lamel = layer.getLamel();
            String rgbFib = Integer.toHexString(lamel.getColorSet().getFiber().getRGB());
            rgbFib = rgbFib.substring(2, rgbFib.length());
            String rgbEpo = Integer.toHexString(lamel.getColorSet().getBackground().getRGB());
            rgbEpo = rgbEpo.substring(2, rgbEpo.length());
            String plotUD = "--------------------------------------------------------------------------------------------------------------------------------------------------------";
            String plotNulNegentig = "--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--";
            String plotMinVijfenveertigPlusVijfenveertig = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
            String plot = plotUD;
            if(lamel.getType().equals(MaterialDirection.MINVIJFENVEERTIGVIJFENVEERTIG))
            {
                plot = plotMinVijfenveertigPlusVijfenveertig;
            }
            else if(lamel.getType().equals(MaterialDirection.NULNEGENTIG))
            {
                plot = plotNulNegentig;
            }
            model.addRow(new Object[]{i+1,lamel,lamel.getAngle(),lamel.getThickness(), "<html><p bgcolor=\"#"+rgbEpo+"\"><font color=\"#"+rgbFib+"\">"+plot+"</font></p></html>"});
            i++;
        }

        if(selection==-1){
            //pnlEditF.setVisible(false);
        }
        else
        {
            mat = (Lamel) tblLayers.getValueAt(selection, 1);
        }
        tblLayers.changeSelection(selection, 0, false, false);

        if(mat == null)
        {
            pnlMat.setVisible(false);
        }
        else
        {
            pnlMat.setVisible(true);
            String el = "El:";
            String et = "Et:";
            String glt = "Glt:";
            String nult = "vlt:";
            if(!mat.getType().equals(MaterialDirection.UNIDIRECTIONAAL))
            {
                el = "E1:";
                et = "E2:";
                glt = "G12:";
                nult = "v12:";
            }

            lblMatName.setText(mat.getName());
            lblMatManufacturer.setText(mat.getManufacturer());
            pnlExample.setSet(mat.getColorSet());
            pnlExample.setSoort(mat.getType());
            lblEl.setText(el);
            lblEt.setText(et);
            lblGlt.setText(glt);
            lblNult.setText(nult);
            lblElVal.setText(String.valueOf(Calculations.Round(mat.getEl() / 1e9, 2)) + " GPa");
            lblEtVal.setText(String.valueOf(Calculations.Round(mat.getEt() / 1e9, 2)) + " GPa");
            lblGltVal.setText(String.valueOf(Calculations.Round(mat.getGlt()/1e9, 2))+" GPa");
            lblNultVal.setText(String.valueOf(Calculations.Round(mat.getMult(), 2)));
            lblMatRho.setText(String.valueOf(Calculations.Round(mat.getRhol(), 2))+" Kg/m3");
            lblMatH.setText(String.valueOf(Calculations.Round(mat.getThickness(), 2))+" mm");

            pnlExample.repaint();

        }
        mvpA.sizeFix();
        mvpB.sizeFix();
        mvpD.sizeFix();
        if(lam.getLayers().isEmpty())
        {
            Matrix legeMatrix = new Matrix(3, 3);
            mvpA.setMatrix(legeMatrix);
            mvpB.setMatrix(legeMatrix);
            mvpD.setMatrix(legeMatrix);
            lblE1.setText("0 GPa");
            lblE2.setText("0 GPa");
            lblE3.setText("0 GPa");
            lblG12.setText("0 GPa");
            lblG23.setText("0 GPa");
            lblG31.setText("0 GPa");
            lblv12.setText("0");
            lblv23.setText("0");
            lblv31.setText("0");
            lblRho.setText("0 Kg/m3");
            lblH.setText("0 mm");
            lblAlpha1.setText("0");
            lblAlpha2.setText("0");
            lblAlpha12.setText("0");
            lblAlphaC1.setText("0");
            lblAlphaC2.setText("0");
            lblAlphaC12.setText("0");
        }
        else
        {
//            Matrix a = MaakMatrix.A(matrix, Global.data);
//            Matrix b = MaakMatrix.B(matrix, Global.data);
//            Matrix d = MaakMatrix.D(matrix, Global.data);
            if (!lam.isMatrices1Calculated()) lam.calculateMatrices1();
            Matrix a = lam.getA();
            Matrix b = lam.getB();
            Matrix d = lam.getD();
//            Matrix nt = MaakMatrix.Nt(matrix, Global.data);
//            Matrix mt = MaakMatrix.Mt(matrix, Global.data);
//            Matrix nmat = MaakMatrix.NMmat(nt, mt);
//            Matrix ekmat = MaakMatrix.EKMat(nmat, a, b, d);
            mvpA.setMatrix(a);
            mvpA.setToolTipText(a.toString());
            mvpB.setMatrix(b);
            mvpB.setToolTipText(b.toString());
            mvpD.setMatrix(d);
            mvpD.setToolTipText(d.toString());
            
            //TODO: e1 t/m rho van LAMINAAT (matrix hieronder is laminaat.getLam() van oude package)
//            double e1 = Calc.E1(matrix, Global.data)/1e9;
//            double e2 = Calc.E2(matrix, Global.data)/1e9;
//            double e3 = Calc.E3(matrix, Global.data)/1e9;
//            double nu12 = Calc.Mu12(matrix, Global.data);
//            double nu23 = Calc.Nu23(matrix, Global.data);
//            double nu31 = Calc.Nu31(matrix, Global.data);
//            double g12 = Calc.G12(matrix, Global.data)/1e9;
//            double g23 = Calc.G23(matrix, Global.data)/1e9;
//            double g31 = Calc.G31(matrix, Global.data)/1e9;
//            double dikte = Calc.H(matrix);
//            double rho = Calc.Rho(matrix, Global.data);
//
//            lblE1.setText(String.valueOf(Calc.Round(e1, 2))+" GPa");
//            lblE2.setText(String.valueOf(Calc.Round(e2, 2))+" GPa");
//            lblG12.setText(String.valueOf(Calc.Round(g12, 2))+" GPa");
//            lblv12.setText(String.valueOf(Calc.Round(nu12, 2)));
//            lblH.setText(String.valueOf(dikte)+" mm");
//            lblRho.setText(String.valueOf(Calc.Round(rho, 2))+" Kg/m3");
//            lblE3.setText(String.valueOf(Calc.Round(e3, 2))+" GPa");
//            lblG23.setText(String.valueOf(Calc.Round(g23, 2))+" GPa");
//            lblG31.setText(String.valueOf(Calc.Round(g31, 2))+" GPa");
//            lblv23.setText(String.valueOf(Calc.Round(nu23, 2)));
//            lblv31.setText(String.valueOf(Calc.Round(nu31, 2)));
            
            //TODO: ekMat?
            //Matrix ekMat = MaakMatrix.EKMat(MaakMatrix.NMmat(MaakMatrix.Nt(matrix, Global.data), MaakMatrix.Mt(matrix,Global.data)), a, b, d);
//            lblAlpha1.setText(String.valueOf(Calc.Round(ekMat.get(0, 0), 2)));
//            lblAlpha2.setText(String.valueOf(Calc.Round(ekMat.get(1, 0), 2)));
//            lblAlpha12.setText(String.valueOf(Calc.Round(ekMat.get(2, 0), 2)));
//            lblAlphaC1.setText(String.valueOf(Calc.Round(ekMat.get(3, 0), 2)));
//            lblAlphaC2.setText(String.valueOf(Calc.Round(ekMat.get(4, 0), 2)));
//            lblAlphaC12.setText(String.valueOf(Calc.Round(ekMat.get(5, 0), 2)));

        }

        this.repaint();
        this.validate();
    }
}
